<?php
class Gn_model extends CI_Model {
	
	public function __construct(){
		parent::__construct();
		
		$this->load->database();
	}
	
	
	function get_noticia(){
		
		$this->db->where('ativo', 'S');
		
		$this->db->order_by('data', 'desc');
		
		$query = $this->db->get('noticia');
		
		return $query->result_array();
		
	}
	
	
	
}
?>